<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../config.inc.php");

$LottoID = 1;
include_once(__Language_Path."/selectlanguage_member.php");
include_once(__Common_Path."/betparam/AnimalsParams_".$LottoID.".inc.php");
include_once(__Common_Path."/Lotto.inc.php");
include_once(__Modules_Path."/Lotto.lib.php");

$fp = file(__Membertemplate_Path."/rule_".$_intLang.".html");
$fp = implode("", $fp);
$fp = setHTMLCharset($fp);

for($i = 1; $i <= 12; $i++){
	$intNo = intval($_arrAnimalsParams[$i]);
	$fp = str_replace("{Animals_".(string)$intNo."}", $_arrAnimalsParams[$i], $fp);
	$fp = str_replace("{AN_".(string)$intNo."}", $_arrAnimals[$i], $fp);
}

$intNo = 5;
$strLCon = "";
$arrLottoPower = getLottoUsePowerArray();
preg_match("/<!--@ Lotto Start @\/\/-->(.+)<!--@ Lotto End @\/\/-->/s", $fp, $arrLCon);
//print_r($arrLottoPower);
foreach($arrLottoPower as $intLottoID){
	if($intLottoID <= 3)continue;
	$strTmp = $arrLCon[1];

	$arrLotto = $_arrLotto[$intLottoID];
	$strTmp = str_replace("{LName}", $arrLotto["Lotto_".$_intLang], $strTmp);
	$strTmp = str_replace("{LID}", $intLottoID, $strTmp);
	$strTmp = str_replace("{No}", $intNo, $strTmp);
	$intNo++;
	$strLCon = $strLCon."\n".$strTmp;
}
$fp = preg_replace("/<!--@ Lotto Start @\/\/-->.+<!--@ Lotto End @\/\/-->/s", $strLCon, $fp);

//輸出
WebOutputHTML($fp, 1);
?>